<template>
  <div class="kapian">
   <div class="内容">
      <div class="ka" v-for="(s,i) in item" :key="i" >
        <div>
          <img :src="`http://localhost:3000${s.pic}`" alt="">
        </div>
        <div>
          <div>{{s.title}}</div>
          <div class="wen">
            <div>
              <h4>￥:{{s.price}}</h4>
              <p>销量:{{s.spec}}</p>
            </div>
            <div class="tubiao">
      <van-icon name="cart" color="red" size="35px" @click="tiaozhuan(s.lid)"/>
            </div>
          </div>

        </div>      
      </div>
   </div>
  </div>
</template>

<script>
  export default {
    props:['item'],
     methods: {
      tiaozhuan(lid){
        this.$router.push({
          path:'/porduct',
          query:{
            id:lid
          }
        })
      }
     }
  }
</script>

<style scoped src='../assets/css/kapian.css'></style>